2027 Method
Changes 0
M

Element.IsValidType

Description:
Checks if given type is valid for the set of elements.
Remarks:
A type is valid for the set of elements if it is valid for each and every element in the set.
Overloads (2):
IsValidType(Document,ICollection[ElementId],ElementId)
public static bool IsValidType(
	Document document,
	ICollection<ElementId> elementIds,
	ElementId typeId
)
  • document
    The document.
  • ICollection<ElementId>
    elementIds
    A collection of element IDs.
  • typeId
    ElementId of the type to check.
Return Value Boolean True if all elements can have a type assigned and this type is valid for all elements, false otherwise.